1. Field of the Invention
The present invention relates to an information recording/reproducing method for recording/reproducing predetermined information on/from an information recording medium in accordance with commands sent from a host computer via a SCSI (Small Computer System Interface).
2. Related Background Art
A SCSI was standardized as ANSI X3. 131-1986 after deliberation at the X3T9.2 committee of the ANSI (American National Standards Institute) on the basis of an interface SASI (Shugart Associates System Interface) for connection between small computers and their peripheral devices available from Shugart, U.S.A. The SCSI has been increasingly accepted as a standard interface for connection between personal computers and their peripheral devices. Recently, attempts have been made on standardization of a SCSI-2 as a new version of the SCSI. At present, however, a final decision has not been reached yet. The range of the SCSI rules defined by the ANSI includes the following five points:
(1) the types and definitions of interface signals and the timings of signal exchange; PA1 (2) a protocol for defining the operation sequence of an interface and the definitions of phases and the like; PA1 (3) physical interface conditions such as cable specifications and connector specifications, and electrical conditions for a transmission system; PA1 (4) a command system for executing various types of control of peripheral devices, the formats of commands, and the functions of commands; and PA1 (5) the format of a status byte for informing a host computer of a command execution result, and the structure of sense data for informing an abnormal state in the process of executing the command. PA1 (1) group 0: 6 bytes PA1 (2) group 1: 10 bytes PA1 (3) groups 2 to 4: reserved PA1 (4) group 5: 12 bytes PA1 (5) groups 6 and 7: vendor unique (vender specific)
The command system in item (4) is defined as follows. SCSI commands are classified into eight groups. The first byte of a CDB (Command Description Block) is an operation code. The upper three bits of this code designate a group code; and the lower five bits, a command code (a code indicating the type of command) for each group. The lengths of CDBs in the respective groups are defined as follows:
CDBs in groups 6 and 7 are command groups which can be uniquely defined by each SCSI device. In the logical block address of each command, fixed-length data blocks are consecutively arranged on a logical unit.
FIG. 1 shows the format of logical blocks in a hard disk unit. Referring to FIG. 1, a data block specified by cylinder=0 and sector=0 is defined as logical block address=0, and the logical block address is incremented by one every time the sector, the track, and the cylinder are incremented by one in the order named. The advantage of a logical block address is that no physical structure needs to be considered because an initiator (host computer) accesses data by designating the logical block address of the first data block and the number of blocks to be processed. With the use of logical block addresses, therefore, when devices based on different specifications concerning the numbers of cylinders, tracks, sectors, and the like are connected to each other, they can be operated by the same software.
FIG. 2 shows the arrangement of a general SCSI system. Although a physical device such as a hard disk like the one shown in FIG. 1 is generally connected as a logical unit, a logical unit number (LUN) may be assigned to a physical or virtual device. In general, in a SCSI, eight logical units of LUN=0 to 7 can be connected to a SCSI bus. By using an extension message, a maximum of 2,048 logical units can be connected.
As described above, a CDB of a SCSI command consists of six bytes or more. FIG. 3 shows a CDB of a Write command in group 0. Referring to FIG. 3, Logical Unit Number indicates a logical unit for which the command is issued; Logical Block Address, a logical block of the command which is to be executed first; and Transfer Length, the number of logical blocks to be executed consecutively. Assume that a Write command is issued. In this case, data is recorded in consecutive logical blocks, of a logical unit indicated by the Logical Unit Number bits, which ranges from a logical block indicated by the Logical Block Address bytes to a logical block indicated by the Transfer Length byte.
In the SCSI interface, when a command terminates normally, the target returns a good status to the initiator. In contrast to this, if a command terminates abnormally, the target returns a check condition status to the initiator, and creates sense data like the one shown in FIG. 4. Referring to FIG. 4, "Valid" indicates whether Information Bytes at bytes 3 to 6 are valid. If Valid=1, they are valid. Error Class and Error Code indicate the format of sense data. If Error Class=7 and Error Code=0, they indicate extended sense data. Sense Key indicates the type of error; and Information Bytes, the location (logical block) of an error. Additional Sense Length indicates the number of bytes of sense data added after byte 8. Sense Code indicates the detailed information of an error.
When a check condition status is returned from the target to the initiator in response to an issued command, the initiator issues a request status command and receives sense data created by the target. With this operation, the initiator can determine the kind of error from Sense Key and Sense Code, and the location of the error from Information Bytes if valid=1.
As described above, upon reception of a command with respect to a plurality of logical blocks, the target generally sets sense data and terminates the command by sending a check condition status when an error is caused. Consider, for example, a Read command with respect to five consecutive logical blocks from logical block 1 to logical block 5. When a read error occurs in the process of reading logical block 3, the target sets Sense Key to 3H (Medium Error); Sense Code to 11H (Read Error); Information Bytes to 3 (indicating a logical block in which the error has occurred); Valid to 1 (indicating the Information Bytes are valid) in sense data, and returns a check condition status to the initiator. The initiator receives the sense data by issuing a request status command, and issues a Read command again with respect to logical block 3 indicated by the Information Bytes. With this operation, a retry with respect to the error can be performed. As described above, Information Bytes generally indicate a logical block address for which the initiator should perform a retry next.
As conventional information recording media, a floppy disk for magnetically recording/reproducing information, an optical information recording medium for optically recording/reproducing information, and the like are known. Optical information recording media are available in various forms, e.g., disk-like, card-like, and tape-like forms. Of these optical information recording media, a card-like optical information recording medium (to be referred to as an optical card hereinafter) is expected to be in great demand as an information recording medium which is compact and lightweight and hence can be easily carried, and has a relatively large capacity. Information recording media are classified into erasable, rewritable media and media which allows no such operations. Optical cards are generally used as media which are not erasable nor rewritable. Therefore, optical cards are expected to be used in the medical field and the like in which the above characteristic is considered as an advantage.
In a recording/reproducing apparatus using such an optical card as a recording medium, the optical card and a light beam for a recording/reproducing operation are reciprocated relative to each other to record/reproduce information on/from the recording surface of the optical card. In a recording/reproducing operation, light beam control techniques such as automatic focusing (AF) and automatic tracking (AT) are used to position a light beam on a track on a recording surface.
When a plurality of logical blocks (sectors) are arranged on one track as is the case with an optical card or optical disk, logical blocks present on the same track within a logical block range defined by a CDB of a command are subjected to write processing at once, and the written data are verified at once, instead of writing and verifying in units of sectors. Since the processing time can be shortened by performing processing in units of tracks, this method is generally used. Assume that logical blocks present on the same track are processed at once. In this case, if errors occur in a plurality of sectors on the same target track, the errors in the plurality of logical sectors cannot be informed to the host computer at once, because only a set of Information Bytes are prepared, in sense data defined by the conventional SCSI, as bytes for informing the host computer of logical block in which an error has occurred. Generally, in this case, therefore, a logical block in which an error has occurred first is set in Information Bytes, and the host computer executes a retry operation from the logical block in which the error has occurred first.
Assume that a Write and Verify command is issued with respect to a plurality of logical blocks, and verify errors occur in a plurality of logical blocks in a logical block range designated by a CDB of a command. In this case, a logical block address at which an error has occurred first from the viewpoint of a command, i.e., in general, the smallest address of the logical blocks at which the errors have occurred, is set in Information Bytes.
In practice, however, there may be a subsequent logical block or blocks for which a command has terminated normally. This is also true of cases wherein read errors occur upon issuing of a Read command, and verify errors occur upon issuing of a Verify command, as long as the command is issued with respect to a plurality of logical blocks. According to the conventional information recording/reproducing method, since there is no method of informing a host computer of information about logical blocks after a logical block in which an error has occurred first, the host computer cannot help performing a retry from an address set in an Information Byte. Consequently, retry processing is wastefully performed upon occurrence of an error, resulting in an increase in processing time.